fix(bedrock): normalize 3gp video format#2306
Open
he-yufeng wants to merge 1 commit into
Open
Conversation
5944452 to
e814ac7
Compare
e814ac7 to
012dc57
Compare
012dc57 to
444de41
Compare
Contributor
Author
|
Rebased this onto current main and revalidated the Bedrock model path. Current head is 444de41. Validation from strands-py: uv run pytest tests/strands/models/test_bedrock.py -q --basetemp ...tmp\pytest-2306 -p no:cacheprovider: 169 passed; uv run ruff check src/strands/models/bedrock.py tests/strands/models/test_bedrock.py; python -m py_compile strands-py\src\strands\models\bedrock.py strands-py\tests\strands\models\test_bedrock.py; git diff --check origin/main...HEAD. Note: ruff format --check wants to reformat pre-existing lines in origin/main's bedrock.py as well, so I did not include unrelated formatting churn in this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Bedrock 3GP part of #2204.
Bedrock expects the video format enum to be
three_gp, while common MIME/extension paths produce3gp,3gpp, or3g2. The SDK currently forwards the value as-is, so a valid 3GP video content block can be rejected by the Bedrock Converse API.This normalizes those aliases when formatting Bedrock video content blocks. Other media-format gaps from #2204 are left out of this PR.
To verify
Ran locally: